/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ticketmaster.dataobject;

import java.sql.Timestamp;

/**
 *
 * @author Wei Liu
 */
public class TicketView
{
    private int bookedTicketID;
    private int customerID;
    private int seatNumber;
    private Timestamp bookedDate;
    private boolean isCancelled;
    private boolean isPaid;
    private int transactionID;
    private double price;
    private String seatCategory;
    private String eventName;
    private String eventDescription;
    private String venueName;
    private int eventID;
    private int venueID;

    /**
     * @return the bookedTicketID
     */
    public int getBookedTicketID()
    {
        return bookedTicketID;
    }

    /**
     * @param bookedTicketID the bookedTicketID to set
     */
    public void setBookedTicketID(int bookedTicketID)
    {
        this.bookedTicketID = bookedTicketID;
    }

    /**
     * @return the customerID
     */
    public int getCustomerID()
    {
        return customerID;
    }

    /**
     * @param customerID the customerID to set
     */
    public void setCustomerID(int customerID)
    {
        this.customerID = customerID;
    }

    /**
     * @return the seatNumber
     */
    public int getSeatNumber()
    {
        return seatNumber;
    }

    /**
     * @param seatNumber the seatNumber to set
     */
    public void setSeatNumber(int seatNumber)
    {
        this.seatNumber = seatNumber;
    }

    /**
     * @return the bookedDate
     */
    public Timestamp getBookedDate()
    {
        return bookedDate;
    }

    /**
     * @param bookedDate the bookedDate to set
     */
    public void setBookedDate(Timestamp bookedDate)
    {
        this.bookedDate = bookedDate;
    }

    /**
     * @return the isCancelled
     */
    public boolean isIsCancelled()
    {
        return isCancelled;
    }

    /**
     * @param isCancelled the isCancelled to set
     */
    public void setIsCancelled(boolean isCancelled)
    {
        this.isCancelled = isCancelled;
    }

    /**
     * @return the isPaid
     */
    public boolean isIsPaid()
    {
        return isPaid;
    }

    /**
     * @param isPaid the isPaid to set
     */
    public void setIsPaid(boolean isPaid)
    {
        this.isPaid = isPaid;
    }

    /**
     * @return the transactionID
     */
    public int getTransactionID()
    {
        return transactionID;
    }

    /**
     * @param transactionID the transactionID to set
     */
    public void setTransactionID(int transactionID)
    {
        this.transactionID = transactionID;
    }

    /**
     * @return the price
     */
    public double getPrice()
    {
        return price;
    }

    /**
     * @param price the price to set
     */
    public void setPrice(double price)
    {
        this.price = price;
    }

    /**
     * @return the seatCategory
     */
    public String getSeatCategory()
    {
        return seatCategory;
    }

    /**
     * @param seatCategory the seatCategory to set
     */
    public void setSeatCategory(String seatCategory)
    {
        this.seatCategory = seatCategory;
    }

    /**
     * @return the eventName
     */
    public String getEventName()
    {
        return eventName;
    }

    /**
     * @param eventName the eventName to set
     */
    public void setEventName(String eventName)
    {
        this.eventName = eventName;
    }

    /**
     * @return the eventDescription
     */
    public String getEventDescription()
    {
        return eventDescription;
    }

    /**
     * @param eventDescription the eventDescription to set
     */
    public void setEventDescription(String eventDescription)
    {
        this.eventDescription = eventDescription;
    }

    /**
     * @return the venueName
     */
    public String getVenueName()
    {
        return venueName;
    }

    /**
     * @param venueName the venueName to set
     */
    public void setVenueName(String venueName)
    {
        this.venueName = venueName;
    }

    public String getDisplayEventName()
    {
        if(eventDescription.isEmpty())
            return eventName.replaceAll(" - Group", "\nGroup").replaceAll(" - Game", "\nGame");
        else
            return eventName.replaceAll(" - Group", "\nGroup").replaceAll(" - Game", "\nGame") + "\n" + eventDescription;
    }

    public int getLevel()
    {
        return (seatNumber / 100 + 1);
    }

    public int getDisplaySeatNumber()
    {
        return seatNumber % 100 + 1;
    }

    public String toString()
    {
        int number = seatNumber % 100 + 1;
        return String.valueOf(number);
    }

    public String getDisplayPrice()
    {
        return "$" + String.format("%.2f", price);
    }

    /**
     * @return the eventID
     */
    public int getEventID()
    {
        return eventID;
    }

    /**
     * @param eventID the eventID to set
     */
    public void setEventID(int eventID)
    {
        this.eventID = eventID;
    }

    /**
     * @return the venueID
     */
    public int getVenueID()
    {
        return venueID;
    }

    /**
     * @param venueID the venueID to set
     */
    public void setVenueID(int venueID)
    {
        this.venueID = venueID;
    }
}
